<admintpl file="header" />
</head>
<body>
	<div class="wrap">
		<ul class="nav nav-tabs">
			<li><a href="{:U('wechat/menu')}">{:L('ADMIN_WXMENU_INDEX')}</a></li>
			<li><a href="{:U('wechat/menu_add')}">{:L('ADMIN_WXMENU_ADD')}</a></li>
			<li class="active"><a href="{:U('wechat/menu_edit')}">{:L('ADMIN_WXMENU_EDIT')}</a></li>
		</ul>
		<form method="post" class="form-horizontal js-ajax-form" action="{:U('wechat/menu_edit_post')}">
			<fieldset>
				<div class="control-group">
					<label class="control-label">上级菜单:</label>
					<div class="controls">
						<select name="post[pid]">
							<option value="0">作为一级菜单</option>
							{$select_categorys}
						</select>
					</div>
				</div>
				<div class="control-group">
					<label class="control-label">菜单名称:</label>
					<div class="controls">
						<input type="text" name="post[name]" value="{$data.name}">
						<span class="form-required">*</span>
					</div>
				</div>
				<div class="control-group">
					<label class="control-label">菜单类型:</label>
					<div class="controls">
						<select name="post[type]">
							<option value="1" <if condition="$data.type eq 1">selected</if>>命令</option>
							<option value="2" <if condition="$data.type eq 2">selected</if>>链接</option>
						</select>
						<span class="form-required">*</span>
					</div>
				</div>
				<div class="control-group">
					<label class="control-label">菜单值:</label>
					<div class="controls">
						<input type="text" name="post[value]" value="{$data.value}" style="width:50%;">
					</div>
				</div>
				<div class="control-group">
					<label class="control-label">排序:</label>
					<div class="controls">
						<input type="text" name="post[order]" value="{$data.order}" placeholder="值越小越靠前">
					</div>
				</div>
			</fieldset>
			<div class="form-actions">
				<input type="hidden" name="post[id]" value="{$data.id}" />
				<button type="submit" class="btn btn-primary js-ajax-submit">{:L('ADD')}</button>
				<a class="btn" href="javascript:history.back(-1);">{:L('BACK')}</a>
			</div>
		</form>
	</div>
	<script src="__PUBLIC__/js/common.js"></script>
</body>
</html>